<html><head><title>Convert haplotypes to strings</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>haplo2string(LGS)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   haplo2string">
<param name="keyword" value=" Convert haplotypes to strings">
</object>


<h2>Convert haplotypes to strings</h2>


<h3>Description</h3>

<p>
Population matrices have one column per locus. <code>haplo2string</code> converts the columns of loci to a single column where alleles are collapsed to  a string representing haplotypes.
</p>


<h3>Usage</h3>

<pre>
haplo2string(x= NULL)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
A population matrix with one column per locus and a final column of haplotype counts (<code>nclones</code>). </td></tr>
</table>

<h3>Value</h3>

<p>
A data frame with columns:
</p>
<table summary="R argblock">
<tr valign="top"><td><code>haplotype</code></td>
<td>
Haplotypes obtained by collapsing loci to string. </td></tr>
<tr valign="top"><td><code>nclones</code></td>
<td>
Haplotype or clone counts as found in the original input matrix. </td></tr>
</table>

<h3>Author(s)</h3>

<p>
Dario Beraldi &lt;<a href="mailto:dario.beraldi@ed.ac.uk">dario.beraldi@ed.ac.uk</a>&gt;
</p>


<h3>See Also</h3>

<p>
<code><a onclick="findlink('base', 'paste.html')" style="text-decoration: underline; color: blue; cursor: hand">paste</a></code> to collapse vectors to strings.
</p>


<h3>Examples</h3>

<pre>
(m1&lt;- cbind(matrix(data=c(0,1), nrow=10, ncol=10), nclones=1:10))
haplo2string(m1)
</pre>

<script Language="JScript">
function findlink(pkg, fn) {
var Y, link;
Y = location.href.lastIndexOf("\\") + 1;
link = location.href.substring(0, Y);
link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
location.href = link;
}
</script>


<hr><div align="center">[Package <em>LGS</em> version 0.9 <a href="00Index.html">Index]</a></div>

</body></html>
